package com.example.zhu95.mytimber.nowplaying;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.zhu95.mytimber.activity.NowPlayingActivity;

/**
 * @author zhu95
 * @date 2018/3/14 23:24
 */
public abstract class BaseTimber extends Fragment {
    protected NowPlayingActivity rootActivity;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        rootActivity = (NowPlayingActivity) getActivity();
        setHasOptionsMenu(true);
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    public abstract void updateUI(int songid, String musicState, int currentPosition);

    public abstract void updateProgress(int songid, int currentPosition);
}
